Use QtLogging Message Pattern to replace MYNAME (#1367)
* use qlogging message pattern to replace MYNAME.
* first cut at removal of MYNAME.
* add message type support
and massage some logging with internal newlines.
* introduce DebugLog class to transform printf ...
style character output into lines suitable for logging.
* handle debug printing in garmin_gpi
including removal of POSIX printf arguement reordring
* use DebugLog with lowranceusr
* use DebugLog in dg100
* fix logging in garmin_txt
* use DebugLog in exif
* use logging for validate.
* fix includes
* use DebugLog in igc
* use logging in kml
* use logging in garmin
* use DebugLog in mtk.
* use DebugLog in tpo
* use logging in trackfilter
* use DebugLog for v900
* use DebugLog in skytraq
* use logging with nmea.
* fix dg100, update references, chop extra newlines.
* appease MSVC C2131
* fix garmin_gpi address debug messages.
and direct vecs debug output to debug msg.
* fix comparison with testo -D 9 igc format
* match globalsat sport ws debug messages
* match ws on fatal()
* update references for option->stderr and
no extra newline on fatal.
* ws
* don't send empty string to QDebug.
* drop another empty string from logging.
* cleanup fatal, flush is done in message handler.
* move conditional logging check earlier.
* make member functions static
* fix debug build.
* eliminate some QString<->QByteArray round trips.
* purse QStrings from fatal routines.
Besides an efficiency hit any variadic argument strings passed to these
routines should already be in local8Bit.
* rename logging functions for easier script editing.
thanks clion.
* add macro gbLogCStr for use with our logging.
All but one line was changed by sed (ok, the sed script took
a few tries.)
This allows us to change the encoding passed to our printf style
logging routines in one place.
* change logging back to using QStrings.
QtMessageHandler operates on QStrings.
* manual rename logging routines in windows only files.
* use global gbLog instead of DebugLog instances.
* convert all gb printflike logging to accumulate lines.
* use gbDebug instead of gbLog. They are equivalent.
* remove unecessary choping.
* fix getLogString, flush fatal log stream.
* terminate gbFatal format strings with a newline.
Since we flush this isn't necessary, but let's be consistent.
* terminate gbWarning format strings.
* switch to our own MessageHandler for legacy logging.
We don't delay logging until we have a complete line, instead
we output any bits as we go. We only format the log message if
the last output for the first message or if the last output
character was a newline.
* rename LegacyLog components.
* update fatal.cc includes
* use same stream in waypt_status_disp & termination in waypt_disp_session.
stderr is a text stream which should translate '\n' -> '\r\n' on windows
automatically.
* review catches, mostly in comments or dead code.
113 files changed: